<h2><?php echo $this->translate('Pages List'); ?></h2>
<div class="grid_12"><?= $this->flashMessenger(); ?></div>
<div class="clear"></div>
<p><a href="<?php echo $this->url(array(), 'pages_page_create'); ?>"><?php echo $this->translate('Create a new Page'); ?></a></p>

<div class="grid_12 alpha omega">
	<table width="100%">
		<thead>
			<tr>
				<th><?php echo $this->translate('Title'); ?></th>
				<th><?php echo $this->translate('Alias'); ?></th>
				<th><?php echo $this->translate('Created at'); ?></th>
				<th><?php echo $this->translate('Updated at'); ?></th>
				<th><?php echo $this->translate('Actions'); ?></th>
			</tr>
		</thead>
		<tbody>
			<?php if(count($this->pages) > 0): ?>
				<?php foreach ($this->pages as $page):?>
					<tr>
						<td><?= $page->Translation[$this->LANG]->name;?></td>
						<td style="text-align:center;"><?= $page->alias;?></td>
						<td style="text-align:center;"><?= $this->Getdate($page->created_at);?></td>
						<td style="text-align:center;"><?= $this->Getdate($page->updated_at);?></td>
						<td style="text-align:center;">
							<a href="<?php echo $this->url(array('id' => $page->id), 'pages_page_show'); ?>">
								<?php echo $this->translate('Show');?>
							</a> &nbsp;|&nbsp;
							<a href="<?php echo $this->url(array('id' => $page->id), 'pages_page_update'); ?>">
								<?php echo $this->translate('Edit');?>
							</a> &nbsp;|&nbsp;
							<a href="<?php echo $this->url(array('id' => $page->id), 'pages_page_delete'); ?>" onclick="return confirm('<?= $this->translate('Are you sure?');?>');">
								<?php echo $this->translate('Delete');?>
							</a>&nbsp;|&nbsp;
							<a href="<?php echo $this->url(array('id' => $page->id), 'pages_node_index'); ?>">
								<?php echo $this->translate('Nodes');?>
							</a>
						</td>
					</tr>
				<?php endforeach;?>
			<?php else: ?>
				<tr>
					<td colspan="5">
						<?= $this->translate('No pages to display'); ?>
					</td>
				</tr>
			<?php endif; ?>
		</tbody>
	</table>
</div>